<template>
  <div>
    <h2>父组件</h2>
    姓名：{{ chinldData.name }}<br>
    年龄：{{ chinldData.age }}
    <br><br>
    <hr>
    <br>
    <Chinld :name="chinldData.name" :age="chinldData.age" @funChange="changeName"></Chinld>
  </div>
</template>
<script setup>
import Chinld from "@/components/Chinld.vue";
import {ref} from "vue";

const chinldData = ref({
  name: '张三三',
  age: 29,
})
const changeName = (name) => {
  chinldData.value.name = name;
}
</script>
<style scoped>

</style>